package com.gis3c.datacenter.entry;

import com.gis3c.online.entry.PollutionSourceStation;
import com.gis3c.spatial.entity.BaseFeature;
import com.sun.org.apache.xpath.internal.operations.Bool;

import java.util.Set;

/**
 * Created by hukekuan on 2018/3/28.
 */
public class Enterprise extends BaseFeature {
    private String enterpriseCode;
    private String enterpriseName;
    private String areaCode;
    private String areaName;
    private String controllerCode;

    private String onLineCode;
    private String industryCode;
    private String industryName;
    private Double longitude;
    private Double latitude;
    private String overStand;

    /**
     * 判断企业是否是在线企业
     * @return true：在线企业；false：非在线企业
     */
    public Boolean isOnLine(){
        Boolean result = false;
        if(this.onLineCode != null
                && !"".equals(this.onLineCode)
                && !"否".equals(this.onLineCode)){
            result = true;
        }
        return result;
    }

    @Override
    public boolean equals(Object obj){
        if(obj == null) return false;
        if(obj instanceof Enterprise){
            Enterprise objEnterprise = (Enterprise)obj;
            if(objEnterprise.getEnterpriseCode() != null
                    && objEnterprise.getEnterpriseCode().equals(this.enterpriseCode)){
                return true;
            }
        }
        return false;
    }

    @Override
    public int hashCode(){
        return this.enterpriseCode.hashCode();
    }

    public String getEnterpriseCode() {
        return enterpriseCode;
    }

    public void setEnterpriseCode(String enterpriseCode) {
        this.enterpriseCode = enterpriseCode;
    }

    public String getEnterpriseName() {
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getControllerCode() {
        return controllerCode;
    }

    public void setControllerCode(String controllerCode) {
        this.controllerCode = controllerCode;
    }

    public String getOnLineCode() {
        return onLineCode;
    }

    public void setOnLineCode(String onLineCode) {
        this.onLineCode = onLineCode;
    }

    public String getIndustryCode() {
        return industryCode;
    }

    public void setIndustryCode(String industryCode) {
        this.industryCode = industryCode;
    }

    public String getIndustryName() {
        return industryName;
    }

    public void setIndustryName(String industryName) {
        this.industryName = industryName;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getOverStand() {
        return overStand;
    }

    public void setOverStand(String overStand) {
        this.overStand = overStand;
    }
}
